package cn.zcl.demo.controller;

import cn.zcl.demo.commom.IpUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: zhanchenlei
 * @Date: 2021/04/30/15:57
 * @Description:测试的controller
 */
@RestController
@RequestMapping("a")
public class DemoController {
    @GetMapping("a")
    public static String Test(HttpServletRequest request) {
        String ipAddr = IpUtil.getIpAddr(request);
        return ipAddr;
    }

}
